/***********************************************************************
 * Module:  OpRecord.java
 * Author:  penwei
 * Purpose: 系统的相关操作记录
 ***********************************************************************/

package cn.hdmis.entity;

import java.util.Date;
/**
 * 项目名称：hdmis1.1
 * 类名称：OpRecord
 * 类描述：操作对象
 * 创建人：Administrator
 * 创建时间：2013-2-13 下午02:47:08
 * 修改人：Administrator
 * 修改时间：2013-2-13 下午02:47:08
 * 修改备注：
 * @version 
 *
 */
public class OpRecord implements java.io.Serializable {
	private static final long serialVersionUID = 1094473039180454752L;
	/**	编号 */
	private int id;
	/**	操作人 */
	private String operator;
	/**	操作对象 */
	private String opObject;
	/**	操作时间 */
	private Date opDate;
	/**	操作事件 */
	private String opEvent;
	/**	事件类型 */
	private int opType;
	/**	备注 */
	private String opBak;
	/**多条操作记录对一学生 */
	private Student student;
	/**多条操作记录对一操作人员 */
	private Manager manager;

	public OpRecord() {
		// TODO Auto-generated constructor stub
	}

	/**
	 * Get value of id
	 * 
	 * @return id
	 */
	public int getId() {
		return id;
	}

	/**
	 * Set value of id
	 * 
	 * @param newId
	 */
	public void setId(int newId) {
		this.id = newId;
	}

	/**
	 * Get value of operator
	 * 
	 * @return operator
	 */
	public String getOperator() {
		return operator;
	}

	/**
	 * Set value of operator
	 * 
	 * @param newOperator
	 */
	public void setOperator(String newOperator) {
		this.operator = newOperator;
	}

	/**
	 * Get value of opObject
	 * 
	 * @return opObject
	 */
	public String getOpObject() {
		return opObject;
	}

	/**
	 * Set value of opObject
	 * 
	 * @param newOpObject
	 */
	public void setOpObject(String newOpObject) {
		this.opObject = newOpObject;
	}

	/**
	 * Get value of opDate
	 * 
	 * @return opDate
	 */
	public java.util.Date getOpDate() {
		return opDate;
	}

	/**
	 * Set value of opDate
	 * 
	 * @param newOpDate
	 */
	public void setOpDate(java.util.Date newOpDate) {
		this.opDate = newOpDate;
	}

	/**
	 * Get value of opEvent
	 * 
	 * @return opEvent
	 */
	public String getOpEvent() {
		return opEvent;
	}

	/**
	 * Set value of opEvent
	 * 
	 * @param newOpEvent
	 */
	public void setOpEvent(String newOpEvent) {
		this.opEvent = newOpEvent;
	}

	/**
	 * Get value of opType
	 * 
	 * @return opType
	 */
	public int getOpType() {
		return opType;
	}

	/**
	 * Set value of opType
	 * 
	 * @param newOpType
	 */
	public void setOpType(int newOpType) {
		this.opType = newOpType;
	}

	/**
	 * Get value of opBak
	 * 
	 * @return opBak
	 */
	public String getOpBak() {
		return opBak;
	}

	/**
	 * Set value of opBak
	 * 
	 * @param newOpBak
	 */
	public void setOpBak(String newOpBak) {
		this.opBak = newOpBak;
	}

	public Student getStudent() {
		return student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	public void setManager(Manager manager) {
		this.manager = manager;
	}

	public Manager getManager() {
		return manager;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	public boolean equals(Object obj) {

		if (obj == null)
			return false;

		if (obj == this)
			return true;

		if (!(obj instanceof OpRecord))
			return false;
		else{
			OpRecord op = (OpRecord)obj;
			return this.getId()==op.getId();
		}

	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		int hashCode = 0;
		hashCode = 29 * hashCode + (new Integer(id)).hashCode();
		if (this.operator != null)
			hashCode = 29 * hashCode + operator.hashCode();
		if (this.opObject != null)
			hashCode = 29 * hashCode + opObject.hashCode();
		if (this.opDate != null)
			hashCode = 29 * hashCode + opDate.hashCode();
		if (this.opEvent != null)
			hashCode = 29 * hashCode + opEvent.hashCode();
		hashCode = 29 * hashCode + (new Integer(opType)).hashCode();
		if (this.opBak != null)
			hashCode = 29 * hashCode + opBak.hashCode();
		return hashCode;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		StringBuffer ret = new StringBuffer();
		ret.append("cn.entity.OpRecord: ");
		ret.append("id='" + id + "'");
		ret.append("operator='" + operator + "'");
		ret.append("opObject='" + opObject + "'");
		ret.append("opDate='" + opDate + "'");
		ret.append("opEvent='" + opEvent + "'");
		ret.append("opType='" + opType + "'");
		ret.append("opBak='" + opBak + "'");
		return ret.toString();
	}

}